<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Ant-contrib Tasks: Http Tasks</title>
  </head>

  <body>
    <h1>HttpClient</h1>
    The &lt;httpClient&gt; type allows the caller to create an HttpClient
    instance, and add it as a reference, or be nested as a subelement of
    an HTTP method call.
    
    <h2>Parameters</h2>
    <table border="1" cellpadding="2" cellspacing="0">
      <tr>
        <th>Attribute</th>
        <th>Description</th>
        <th>Required</th>
      </tr>
      <tr>
        <td valign="top"><i>id</i></td>
        <td valign="top">The reference id to store this HttpClient under.</td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>refId</i></td>
        <td valign="top">The reference id of the HttpClient this element refers to.</td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>stateRefId</i></td>
        <td valign="top">The HttpState object to use.</td>
        <td align="center" valign="top">No. Uses a default HttpState.</td>
      </tr>
    </table>
    
    <h2>Parameters specified as Nested Elements</h2>
    
    <br />
    <br />
    <b>&lt;clientParams&gt;</b><br />
    <p>
    Create http client params.
    </p>
    <table border="1" cellpadding="2" cellspacing="0">
      <tr>
        <th>Attribute</th>
        <th>Description</th>
        <th>Required</th>
      </tr>
      <tr>
        <td valign="top"><i>strict</i></td>
        <td valign="top">Should we be strict on the protocol.</td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>authenticationPreemptive</i></td>
        <td valign="top">Should we pre-emptively try to authenticate?</td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>connectionManagerTimeout</i></td>
        <td valign="top">The timeout for the connection manager.</td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>contentCharSet</i></td>
        <td valign="top">The content character set</td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>cookiePolicy</i></td>
        <td valign="top">The cookie policy (IGNORE_COOKIES, RFC_2109, NETSCAPE or DEFAULT)</td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>credentialCharSet</i></td>
        <td valign="top"></td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>httpElementCharSet</i></td>
        <td valign="top"></td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>soTimeout</i></td>
        <td valign="top"></td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>version</i></td>
        <td valign="top">The HTTP version.</td>
        <td align="center" valign="top">No.</td>
      </tr>
    </table>
    
    Additional <b>&lt;clientParams&gt;</b> subelements:<br />
    &lt;double&gt;,&lt;int&gt;,&lt;long&gt;,&lt;boolean&gt;
    ,&lt;string&gt; <br />
    <p>
    Create a client parameter.
    </p>
    <table border="1" cellpadding="2" cellspacing="0">
      <tr>
        <th>Attribute</th>
        <th>Description</th>
        <th>Required</th>
      </tr>
      <tr>
        <td valign="top"><i>name</i></td>
        <td valign="top">The parameter name</td>
        <td align="center" valign="top">Yes.</td>
      </tr>
      <tr>
        <td valign="top"><i>value</i></td>
        <td valign="top">The parameter value.</td>
        <td align="center" valign="top">Yes.</td>
      </tr>
    </table>
    
    <br />
    <br />
    <b>&lt;hostConfig&gt;</b><br />
    <p>
    Create a host configuration.
    </p>

    <table border="1" cellpadding="2" cellspacing="0">
      <tr>
        <th>Attribute</th>
        <th>Description</th>
        <th>Required</th>
      </tr>
      <tr>
        <td valign="top"><i>host</i></td>
        <td valign="top">The host to connect to.</td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>port</i></td>
        <td valign="top"></td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>protocol</i></td>
        <td valign="top"></td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>address</i></td>
        <td valign="top"></td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>proxyHost</i></td>
        <td valign="top">The proxyHost to connect to.</td>
        <td align="center" valign="top">No.</td>
      </tr>
      <tr>
        <td valign="top"><i>proxyPort</i></td>
        <td valign="top"></td>
        <td align="center" valign="top">No.</td>
      </tr>
    </table>
    <br />
    <br />
    Additional <b>&lt;hostConfig&gt;</b> subelements:<br />
    &lt;hostParams&gt;<br />
    <p>
    Specify HostParams.
    </p>
    <table border="1" cellpadding="2" cellspacing="0">
      <tr>
        <th>&lt;hostParams&gt; subelements are identical to those of
           &lt;clientParams&gt;</th>
      </tr>
    </table>

    <br />
    <br />
    <b>&lt;httpState&gt;</b> <br />
    <p>
    Create (or reference an existing) HttpState
    for use with this HTTP client.  This is necessary if you wish
    to enable authentication, or retain state across multiple method calls.
    </p>
    <table border="1" cellpadding="2" cellspacing="0">
      <tr>
        <th>Please see the <a href="http-state_type.html">httpState</a>
            documentation for more details on this element</th>
      </tr>
    </table>

    <h2>Examples</h2>

    <pre>
    <code>
    &lt;httpClient id="client1"&gt;
        &lt;clientParams cookiePolicy="RFC_2109" /&gt;
    &lt;/httpClient&gt;
    </code>
    </pre>

    <hr>
    <p align="center">Copyright &copy; 2002-2003 Ant-Contrib Project. All
    rights Reserved.</p>

  </body>
</html>
